import Vue from 'vue'
import App from './App.vue'
import store from './store'
import router from './router'
import { Swipe, SwipeItem, NavBar, Tabbar, TabbarItem, Loading } from 'vant';
import * as API from './api';
import { InfiniteScroll } from 'mint-ui';

Vue.use(InfiniteScroll);
Vue.use(Swipe);
Vue.use(SwipeItem);
Vue.use(NavBar);
Vue.use(Tabbar);
Vue.use(TabbarItem)
Vue.use(Loading)
Vue.config.productionTip = false
import { Lazyload } from 'vant';

/* 全局过滤器 */
Vue.filter('imgFilter', function (data) {
  return data.replace(/w.h/, 85.115)
})
/* 将API全局 */
Vue.prototype.$API = API
import './mock' // 引入模拟数据
import './api' // 测试请求
import './plguins/vant' // 引入第三方ui组件库

import 'mint-ui/lib/style.css'
import './mint/mint.js'
// 轮播图
import 'swiper/css/swiper.min.css'

Vue.use(Lazyload);
new Vue({
  render: h => h(App),
  store,
  router,
  beforeCreate() { Vue.prototype.$bus = this }
}).$mount('#app')
